Convert color codes between HEX, RGB and HSL and copy the result with one click. Handy for CSS work and design handoffs.
Convert freely between HEX, RGB and HSL
Edit any one of the HEX code, the three RGB values or the three HSL values, or pick a color with the color picker, and the other notations update instantly while the swatch at the top fills with that color. RGB and HSL have copy buttons that produce CSS-ready strings (rgb(…), hsl(…)). Use it to move colors from a design mockup into code, to make lighter or darker variants of a brand color, or to see what color a code someone sent you actually is.
The three notations describe the same color in different ways. HEX writes red, green and blue as two hex digits each (#RRGGBB), RGB as integers from 0 to 255, and HSL as hue angle (0 to 360 degrees), saturation (0 to 100%) and lightness (0 to 100%). The tool keeps a single RGB value internally; whichever field changes is converted to RGB and the others are recalculated. The HEX field works with or without #, expands three-digit shorthand like #F80 to #FF8800, and displays the result in uppercase. Out-of-range numbers are clamped to 0 to 255, 0 to 360 or 0 to 100. For example, entering FF8800 gives RGB 255, 136, 0 and HSL 32, 100%, 50%. Lowering only L from 50 to 30 then gives a darker version of the same orange, #995200 (153, 82, 0). Everything is calculated in your browser.
They carry exactly the same information, so either works. HEX is shorter and common in code; RGB or HSL is handier when calculating or adjusting values.
It is the angle on the color wheel: 0 red, 60 yellow, 120 green, 180 cyan, 240 blue, 300 magenta, and 360 back to red.
Devices differ in color gamut and calibration. The code is the same but the display differs, so check important colors on the device that will show them.
This tool handles only the three screen notations (HEX, RGB, HSL). Print values depend on paper and press settings, so a simple conversion is not accurate; follow your printer's or design software's standards.
Posts · 0
No posts yet.